Subscription: Michael Miller to operations-discussion
from 5001:
Subscribe Existing Person and Contact to Mailinglist| name | value |
|---|---|
| partnerPersonTradeName | First GmbH |
| subscriberFamilyName | Miller |
| subscriberGivenName | Michael |
| subscriberEMailAddress | michael.miller@example.org |
| mailingList | first-gmbh-internal |
HTTP GET "/api/hs/office/persons?name=First+GmbH" \
-H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
`# {` \
`# "sub" : "uuid<hsh-alex_superuser>"` \
`# }`
=> status: 200 OK
[ {
"uuid" : "63b26b7f-9bc0-4f20-a954-5b6f52f8df23", // Person: First GmbH
"personType" : "LEGAL_PERSON",
"tradeName" : "First GmbH",
"salutation" : null,
"title" : null,
"givenName" : null,
"familyName" : null
} ]
In production, data this query could result in multiple outputs. In that case, you have to find out which is the right one.
HTTP GET "/api/hs/office/persons?name=Miller" \
-H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
`# {` \
`# "sub" : "uuid<hsh-alex_superuser>"` \
`# }`
=> status: 200 OK
[ {
"uuid" : "4023f949-de5c-4708-b1fa-fddbfacab1c7", // Person: Michael Miller
"personType" : "NATURAL_PERSON",
"tradeName" : null,
"salutation" : null,
"title" : null,
"givenName" : "Michael",
"familyName" : "Miller"
} ]
In real scenarios there are most likely multiple results and you have to choose the right one.
HTTP GET "/api/hs/office/contacts?emailAddress=michael.miller@example.org" \
-H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
`# {` \
`# "sub" : "uuid<hsh-alex_superuser>"` \
`# }`
=> status: 200 OK
[ {
"uuid" : "a333a58f-f2ce-454b-9d86-b26d31f7d700", // Contact: michael.miller@example.org
"caption" : "Michael Miller",
"postalAddress" : { },
"emailAddresses" : {
"main" : "michael.miller@example.org"
},
"phoneNumbers" : { }
} ]
In real scenarios there are most likely multiple results and you have to choose the right one.
HTTP POST "/api/hs/office/relations" \
-H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
`# {` \
`# "sub" : "uuid<hsh-alex_superuser>"` \
`# }` \
<<EOF
{
"type" : "SUBSCRIBER",
"mark" : "first-gmbh-internal",
"anchor.uuid" : "63b26b7f-9bc0-4f20-a954-5b6f52f8df23", // Person: First GmbH
"holder.uuid" : "4023f949-de5c-4708-b1fa-fddbfacab1c7", // Person: Michael Miller
"contact.uuid" : "a333a58f-f2ce-454b-9d86-b26d31f7d700" // Contact: michael.miller@example.org
}
EOF
=> status: 201 CREATED 1b8472f1-23c0-4fe5-9896-911dca6f909f
generated on 2026-08-10 03:08:33 for branch HEAD